package com.zkyc.framework.schedulejob.client;

import com.zkyc.framework.common.constant.Constant;
import com.zkyc.framework.common.pojo.FileVerification;
import com.zkyc.framework.common.vo.ResultVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.*;

import java.util.List;


@Service
@FeignClient(value = Constant.SERVICE_WEBSITE, contextId = "fileVerificationService", fallback = FileVerificationClientFallBack.class)
@RequestMapping("fileVerification")
public interface FileVerificationClient {

    @GetMapping("list")
    public ResultVO list(
            @RequestParam(value = "cid", required = false, defaultValue = "-1")int cid,
            @RequestParam(value = "search", required = false, defaultValue = "")String search,
            @RequestParam(value = "current", required = false, defaultValue = "-1") int current,
            @RequestParam(value = "size", required = false, defaultValue = "-1") int size
    );

    /**
     * 批量保存
     *
     */
    @PostMapping("saveBatch")
    public ResultVO saveBatch(@RequestBody List<FileVerification> fileVerifications);
}
